import React from 'react'
// ===================================================================== Temp
import Table from '#cpt/temp/Table'
// ===================================================================== global declare
const { $fn } = window
// ===================================================================== component
class Index extends React.Component{
	state = {
		data:[],
		pag: {},
	}
	
	model = {}
	
	
	load = ({ uuid, spec_code }) => {
		this.query = { uuid, SpecCode: spec_code }
		this.fetch()
	}
	
	// paging
	// fetch = () => $fn.fetch.call(this,'slog/index', { isIndex:true })
	fetch = () => $fn.fetch.call(this,'http://logs.norsonmed.com:8008/querylogs', { isIndex:true })
	
	cols = [
		{ title: '描述', 		dataIndex: 'title' },
		{ title: '操作信息', 	dataIndex: 'hosp_name', 	width:200, render: (text, {operatorName, createdTime}) => {
			return (
				<dl className='lh24'>
					<dd className='fx'><span className='g9 mr5 tr' style={{width:50}}>操作人 :</span><span>{operatorName}</span></dd>
					<dd className='fx'><span className='g9 mr5 tr' style={{width:50}}>时间 :</span><span>{createdTime}</span></dd>
				</dl>
			)
		} },
	]
	
	render(){
		return (
			<div className='fv ex ml5'>
				{/* 表格 */}
				{ Table.call(this, { isIndex:true, noTotal: true, hasBottom: false, wrapClassName:' ' }) }
			</div>
		)
	}
}

export default Index